package com.gambi.example.tapestry.components;

import org.apache.tapestry5.ComponentResources;
import org.apache.tapestry5.annotations.IncludeStylesheet;
import org.apache.tapestry5.annotations.Parameter;
import org.apache.tapestry5.ioc.annotations.Inject;

@IncludeStylesheet("context:js/gwtjs/com.gambi.example.GWTUI/gwt/standard/standard.css")
public class Layout {

	@Inject
	private ComponentResources componentResources;

	@Parameter(defaultPrefix = "literal")
	private String title;

	public String getTitle() {
		if (title != null)
			return title;

		return componentResources.getPageName();
	}

	public void setTitle(String title) {
		this.title = title;
	}

}
